#ifndef CAMERA_H
#define CAMERA_H

#include "Vec3.h"
#include "Frustum.h"

namespace Engine
{
	class Camera
	{
		private:
			Vec3 m_pos;
			Vec3 m_upVector;
			Vec3 m_focus;
			float m_fov;
			float m_aspect;
			float m_near;
			float m_far;

			Frustum m_frustum;
	
		public:
			Camera():m_fov(0.0f), m_aspect(0.0f), m_near(0.0f), m_far(0.0f){}
	
			Camera(const Vec3& pos, const Vec3& upVector, const Vec3& foc,
				   float fov, float aspect, float nearPlane, float farPlane);
	
			//getters and setters
			//cam attributes
			void SetLookAt(const Vec3& pos, const Vec3& upVector, const Vec3& foc);
			void SetPos(const Vec3& pos){m_pos = pos;}
			void SetUpVector(const Vec3& upVector){m_upVector = upVector;}
			void SetFocus(const Vec3& foc){m_focus = foc;}
	
			void SetPerspective(float fov, float aspect, float nearPlane, float farPlane);
			void SetFov(float fov){m_fov = fov;}
			void SetAspect(float aspect){m_aspect = aspect;}
			void SetNear(float nearPlane){m_near = nearPlane;}
			void SetFar(float farPlane){m_far = farPlane;}
	
			const Vec3& GetPos() const {return m_pos;}
			const Vec3& SetUpVector() const {return m_upVector;}
			const Vec3& GetFocus() const {return m_focus;}
	
			float GetFov() const {return m_fov;}
			float GetAspect() const {return m_aspect;}
			float GetNear() const {return m_near;}
			float GetFar() const {return m_far;}

			const Frustum& GetFrustum() const {return m_frustum;}

			void Update();
	
			//apply funcs
			void LookAt();
			void Perspective();
	};
}

#endif